<template>
	<view class="setting plr-20 pt-40 bg min100">
		<view class="setting_ul pl-30 pr-30">
			<view class="setting_li pt-30 pb-30 flex" @click="toAbout">
				<text class="size-30 white">关于我们</text>
				<image src="/static/more.png" mode="" class="img"></image>
			</view>
			<!-- #ifdef APP-PLUS -->
			<view class="setting_li pt-30 pb-30 flex">
				<text class="size-30 white">版本号</text>
				<text class="white size-30">{{ version }}</text>
			</view>
			<!-- #endif -->
		</view>
		<view class="setting_ul pl-30 pr-30 mt-10">
			<view class="setting_li pt-30 pb-30 flex" @click="toPayPassword">
				<text class="size-30 white">修改支付密码</text>
				<image src="/static/more.png" mode="" class="img"></image>
			</view>
		</view>
		<view class="setting_ul pl-30 pr-30 mt-10">
			<view class="setting_li pt-30 pb-30 flex" @click="toPassword">
				<text class="size-30 white">修改登录密码</text>
				<image src="/static/more.png" mode="" class="img"></image>
			</view>
		</view>
		<!-- #ifdef APP-PLUS -->
		<view class="setting_ul pl-30 pr-30 mt-10">
			<view class="setting_li pt-30 pb-30 flex">
				<text class="size-30 white">版本号</text>
				<text class="white size-30">{{ version }}</text>
			</view>
		</view>
		<!-- #endif -->
		<view class="setting_ul pl-30 pr-30 mt-10">
			<view class="setting_li pt-30 pb-30 flex" @click="quitLogin">
				<text class="size-30 white">退出登录</text>
				<image src="/static/more.png" mode="" class="img"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		onLoad() {
			// #ifdef APP-PLUS
			this.getVersions()
			// #endif
			
		},
		methods:{
			//获取版本
			getVersions () {
				this.version = plus.runtime.version
			},
			toPayPassword () {
				uni.navigateTo({
					url:'/pages/my/editPayPassword'
				})
			},
			toPassword () {
				uni.navigateTo({
					url:'/pages/login/editPassword'
				})
			},
			//退出登录
			quitLogin () {
				uni.showModal({
					confirmColor:'#DE2D32',
					content: '是否退出登录',
					success: (res) => {
						if (res.confirm) {
							uni.switchTab({
								url:'/pages/home/index'
							})
							uni.clearStorageSync()
						} else if (res.cancel) {
								console.log('用户点击取消');
						}
					}
				});
			},
			toAbout () {
				uni.navigateTo({
					url:'/pages/my/about'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.setting_ul {
	background: #fff;
	border-radius: 10rpx;
	color: #3c3c3c;
	// .setting_li {
	// 	border-bottom: 2rpx solid #EBEBEB;
	// 	&:last-child {
	// 		border-bottom: none;
	// 	}
	// }
}
.white {
	color: #3c3c3c;
}
.img {
	width: 24rpx;
	height: 24rpx;
}
</style>
